import React, { Component } from 'react'
import RouterViews from '../../router/router.view'

import './index.css'
export default class Home extends Component {
    render() {
        return (
            <div>
               {/* header */}
               <div className="header">头部 <span onClick={()=>this.props.history.push('/login')}>退出</span></div>
               {/* slider */}
              
               <div className="slider">
                    <div  onClick={()=>this.props.history.push('/home/work')}>
                        工作台
                    </div>
                   <div>
                        消息管理
                        <div onClick={()=>this.props.history.push('/home/list')}>消息列表</div>
                        <div onClick={()=>this.props.history.push('/home/add')}>创建消息</div>
                   </div>
                   </div>
               {/* 内容区 */}
                <div className="content"> 
                    
                <RouterViews routers={this.props.routers}/>
               
                </div>

            </div> 
        )
    }
    componentDidMount(){
        console.log(this.props)
    }
}
